import Service from "@/utils/service.ts";

const request = new Service();

// 获取表中所有数据
export function getAll(table: string) { return request.get("/api/db", { table }); }

export function query(table: string, condition: Object) { return request.get("/api/db/query", { table, condition }) }

export function add(table: string, data: Object) {
  return request.post("/api/db", { table, data })
}